// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
 // import Vue from 'vue'
import Vue from "vue/dist/vue.common.js";
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Appp from './App'
import router from './router'
import axios from 'axios'
import qs from 'qs';
import VueResource from 'vue-resource'

import Vant from 'vant';
import 'vant/lib/vant-css/index.css';
import '@/assets/css/comment.less' 

// 全局filter
import {formatDate} from '@/assets/js/date.js';
Vue.filter("formatDate", function(time) {   
	let date = new Date(time);
	return formatDate (date,"yyyy-MM-dd");
});


Vue.use(Vant);

let cookie  = require('./utils/cookie.js');
Vue.use(VueResource);
Vue.use(ElementUI)
var $http = axios.create({
   headers: {
     'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'
   }
});
Vue.config.productionTip = false;
Vue.prototype.cookie = cookie;
Vue.prototype.$ajax = $http;
Vue.prototype.qs = qs;
new Vue({
  el: '#app',
  router,
  components: { Appp },
  template: '<Appp/>'
})
